package cn.iocoder.yudao.module.scrm.controller.admin.refund.vo;

import cn.iocoder.yudao.module.scrm.controller.admin.commom.vo.FileInfoVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

@Schema(description = "管理后台 - 退款新增/修改 Request VO")
@Data
public class RefundSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17156")
    private Long id;

    @Schema(description = "退款编号")
    private String no;

    @Schema(description = "订单号", example = "16699")
    private Long orderId;

    @Schema(description = "客户编号", example = "14758")
    private Long customerId;

    @Schema(description = "合同编号", example = "3835")
    private Long contractId;

    @Schema(description = "负责人编号", example = "5279")
    private String ownerUserId;

    @Schema(description = "退款日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate returnTime;

    @Schema(description = "户名", example = "赵六")
    private String accountName;

    @Schema(description = "卡号")
    private String cardNumber;

    @Schema(description = "开户行", example = "赵六")
    private String bankName;

    @Schema(description = "退款金额", example = "30058")
    @DecimalMin (value = "0.00", message = "金额必须为大于或者等于0.00")
    @Digits(integer = 11, fraction = 2, message = "金额只能有11个整数和两位小数")
    private BigDecimal price;

    @Schema(description = "附件信息")
    private List<FileInfoVO> attachment;

    @Schema(description = "图片-附件信息")
    private List<FileInfoVO> pictureAttachment;

    @Schema(description = "工作流编号", example = "16880")
    private Long processInstanceId;

    @Schema(description = "审批状态", example = "2")
    private Integer auditStatus;

    @Schema(description = "是否发放提成:0未发放，1已发", example = "1")
    private Integer commission;

    @Schema(description = "是否已开票：0未开，1已开", example = "1")
    private Integer invoice;

    @Schema(description = "备注信息", example = "随便")
    private String remark;

}